package com.app;

import java.util.Map;

public class ContextProperties {

	private Map<String, String> properties;

	public Map<String, String> getProperties() {
		return properties;
	}

	public void setProperties(Map<String, String> properties) {
		this.properties = properties;
	}
	
	public String getProperty(String name) {
		
		if(properties.containsKey(name)){
		
			return properties.get(name);
		}
		else
			throw new IllegalStateException(String.format("Couldn't get application property name '%s'", name));
	}

	public boolean containsProperty(String name) {
		
		return properties.containsKey(name);
	}
}
